//
//  BAboutView.swift
//  BMort_SwiftUI
//
//  Created by anscen on 2022/9/2.
//

import SwiftUI
import SwiftyJSON
struct BAboutView: View {
    @State var title :String = ""
//    @State var ipAddress :String = ""
    var body: some View {
        VStack(alignment: .center, spacing: 20) {
            VStack.init {
                Image("icon_logo")
                Text(title).foregroundColor(Color.appx666666())
            }
            Spacer(minLength: 30)
        }.onAppear {
            //debugPrint(rootSize.size.width)
            self.loadData()
        }.navigationBarTitle("关于我们").navigationBarBackButtonHidden(true).navigationBarItems(leading: BaseNaviBarBack())
    }
    func loadData(){
        let json = JSON(Bundle.main.infoDictionary as Any)
        let name = json["CFBundleName"].stringValue
        let version = json["CFBundleShortVersionString"].stringValue
        title = name + "(\(version))"

    }
}
